import {
  fetch,
  fetchCPT
} from './fetch.js'

// // 登录
// const login = params => {
//   return fetchCPT({
//     url: '/Loginyz',
//     method: 'post',
//     params: params
//   })
// }
// // 验证码
// const getCpt = params => {
//   return fetchCPT({
//     url: '/Getcpt',
//     method: 'get',
//     data: params
//   })
// }
// const orderList = params => {
//   return fetch({
//     url: `/api/data/${params.category}/${params.limit}/${params.page}`,
//     method: 'get',
//     params: ''
//   })
// }
const apiList = {
  // 登录
  login: function (params) {
    return fetchCPT({
      url: '/Loginyz',
      method: 'post',
      params: params
    })
  },
  // 验证码
  getCpt: function (params) {
    return fetchCPT({
      url: '/Getcpt',
      method: 'get',
      data: params
    })
  },
  // 退出
  logout: function (params) {
    return fetch({
      url: '/auth/LogoutAPI',
      method: 'get',
      params: params
    })
  },
  Loginynz: function(params) {
    console.log(params)
    return fetchCPT({
      url: '/Loginynz',
      method: 'post',
      params: params
    })
  },
  //获取用户数据
  getMe: function (params) {
    return fetch({
      url: '/user/Getme',
      method: 'get',
      params: params
    })
  },
  //获取资源
  getResource: function (params) {
    return fetch({
      url: '/resource/',
      method: 'get',
      params: params
    })
  },
  // 更新资源
  updateResource: function (data) {
    return fetch({
      url: '/resource/Update',
      method: 'post',
      params: data
    })
  },
  // 添加资源
  addResource: function (data) {
    return fetch({
      url: '/resource/',
      method: 'post',
      params: data
    })
  },
  // 删除资源
  deleteResource: function (data) {
    return fetch({
      url: '/resource/Delete',
      method: 'post',
      params: data
    })
  },
  // 获取用户列表
  getUser: function (data) {
    return fetch({
      url: '/user/',
      method: 'get',
      params: data
    })
  },
  GetUserByDept: function (data) {
    return fetch({
      url: "/user/GetUserByDept",
      method: "post",
      params: data
    })
  },
  // 获取单位用户列表
  GetAllOrgUsers: function (data) {
    return fetch({
      url: '/user/GerUserByOrg',
      method: 'get',
      params: data
    })
  },
  // 根据角色获取单位用户
  GetUsersByRole: function (data) {
    return fetch({
      url: '/user/GetAllOrgUsers',
      method: 'get',
      params: data
    })
  },
  //更新用户
  updateUser: function (data) {
    return fetch({
      url: '/user/Update',
      method: 'post',
      params: data
    })
  },
  //添加用户
  addUser: function (data) {
    return fetch({
      url: '/user/',
      method: 'post',
      params: data
    })
  },
  // 删除用户
  deleteUser: function (data) {
    return fetch({
      url: '/user/Delete',
      method: 'post',
      params: data
    })
  },
  // 删除用户列表
  deleteUsers: function (data) {
    return fetch({
      url: '/user/DeleteUsers',
      method: 'post',
      params: data
    })
  },

  // 更新密码
  ChangePwd: function (data) {
    return fetch({
      url: '/user/ChangePwd',
      method: 'post',
      params: data
    })
  },
  // 重置密码
  ResetPwd: function (data) {
    return fetch({
      url: '/user/ResetPwd',
      method: 'post',
      params: data
    })
  },
  // 更新用户属性
  UpdateUserProf: function (data) {
    return fetch({
      url: '/user/UpdateUserProf',
      method: 'post',
      params: data
    })
  },
  // 照片取消
  PhotoCancel: function (data) {
    return fetch({
      url: '/user/PhotoCancel',
      method: 'post',
      params: data
    })
  },
  //获取客户单位
  getOrganization: function (data) {
    return fetch({
      url: '/organization/',
      method: 'get',
      params: data
    })
  },
  // 获取客户单位列表
  getOrganizationList: function (data) {
    return fetch({
      url: '/organization/GetOrganizationList',
      method: 'get',
      params: data
    })
  },
  // 更新客户单位
  updateOrganization: function (data) {
    return fetch({
      url: '/organization/Update',
      method: 'post',
      params: data
    })
  },
  // 添加客户单位
  addOrganization: function (data) {
    return fetch({
      url: '/organization/',
      method: 'post',
      params: data
    })
  },
  // 删除客户单位列表
  deleteOrganization: function (data) {
    return fetch({
      url: '/organization/Delete',
      method: 'post',
      params: data
    })
  },
  //获取角色
  getRole: function (data) {
    return fetch({
      url: '/role/',
      method: 'get',
      params: data
    })
  },
  // 获取角色列表
  getRoleList: function (data) {
    return fetch({
      url: '/role/GetRoleList',
      method: 'get',
      params: data
    })
  },
  // 获取组织角色列表
  GetOrgRoleList: function (data) {
    return fetch({
      url: '/role/GetOrgRoleList',
      method: 'get',
      params: data
    })
  },
  // 更新角色
  updateRole: function (data) {
    return fetch({
      url: '/role/Update',
      method: 'post',
      params: data
    })
  },
  // 添加角色
  addRole: function (data) {
    return fetch({
      url: '/role/',
      method: 'post',
      params: data
    })
  },
  // 删除角色
  deleteRole: function (data) {
    return fetch({
      url: '/role/Delete',
      method: 'post',
      params: data
    })
  },
  // 删除多个角色
  deleteRoles: function (data) {
    return fetch({
      url: '/role/DeleteRoles',
      method: 'post',
      params: data
    })
  },
  // 获取角色资源树
  GetRoleResourceTree: function (data) {
    return fetch({
      url: `/role/GetRoleResourceTree/` + data,
      method: 'get'
    })
  },
  // 获取角色资源树2
  GetResByRole: function (data) {
    return fetch({
      url: `/role/GetResByRole/` + data,
      method: 'get'
    })
  },

  // 角色分配资源
  AssignResources: function (data) {
    return fetch({
      url: '/role/AssignResources',
      method: 'post',
      params: data
    })
  },
  // 获取部门
  GetDept: function (data) {
    return fetch({
      url: '/dept/',
      method: 'get',
      params: data
    })
  },
  GetDeptTree: function () {
    return fetch({
      url: '/dept/GetDeptTree',
      method: 'get'
    })
  },
  SetDeptDirector: function (data) {
    return fetch({
      url: '/dept/SetDeptDirector',
      method: 'post',
      params: data
    })
  },
  // 更新部门
  UpdateDept: function (data) {
    return fetch({
      url: '/dept/Update',
      method: 'post',
      params: data
    })
  },
  // 添加部门
  AddDept: function (data) {
    return fetch({
      url: '/dept/',
      method: 'post',
      params: data
    })
  },
  // 删除部门
  DeleteDept: function (data) {
    return fetch({
      url: '/dept/Delete',
      method: 'post',
      params: data
    })
  },
  // 删除部门列表
  DeleteDepts: function (data) {
    return fetch({
      url: '/dept/DeleteDepts',
      method: 'post',
      params: data
    })
  },
  // 用户分配部门
  AssignUserDept: function (data) {
    return fetch({
      url: '/dept/AssignUserDept',
      method: 'post',
      params: data
    })
  },
  GetEngineerByDept: function(data) {
    return fetch({
      url: '/engineer/GetEngineerByDept',
      method: 'post',
      params: data
    })
  },
  //获取工作流
  getFlow: function (data) {
    return fetch({
      url: '/flow/',
      method: 'get',
      params: data
    })
  },
  // 获取单个工作流
  getFlowOne: function (data) {
    return fetch({
      url: `/flow/` + data,
      method: 'get',
      params: data
    })
  },
  // 获取工作流实例
  getFlowInst: function (data) {
    return fetch({
      url: `/flowinstance/` + data,
      method: 'get',
      params: data
    })
  },
  // 添加工作流
  AddFlow: function (data) {
    return fetch({
      url: '/flow/',
      method: 'post',
      params: data
    })
  },
  // 删除工作流
  deleteFlow: function (data) {
    return fetch({
      url: '/flow/Delete',
      method: 'post',
      params: data
    })
  },
  // 更新工作流
  UpdateFlow: function (data) {
    return fetch({
      url: '/flow/Update',
      method: 'post',
      params: data
    })
  },
  //获取动作
  getAction: function (data) {
    return fetch({
      url: '/action/GetAll',
      method: 'get',
      params: data
    })
  },
  updateAction: (data) => {
    return fetch({
      url: '/action/Update',
      method: 'post',
      params: data
    })
  },
  // 删除动作
  deleteAction: function (data) {
    return fetch({
      url: '/action/Delete',
      method: 'post',
      params: data
    })
  },
  AddAction: (data) => {
    return fetch({
      url: '/action/',
      method: 'post',
      params: data
    })
  },
  //获取工作流-事件
  getEvent: function (data) {
    return fetch({
      url: '/event/GetAll',
      method: 'get',
      params: data
    })
  },
  // 删除工作流事件
  deleteEvent: function (data) {
    return fetch({
      url: '/event/Delete',
      method: 'post',
      params: data
    })
  },
  addEvent: (data) => {
    return fetch({
      url: '/event/',
      method: 'post',
      params: data
    })
  },
  updateEvent: (data) => {
    return fetch({
      url: '/event/Update',
      method: 'post',
      params: data
    })
  },
  //获取日志
  getLog: function (data) {
    return fetch({
      url: '/log/GetAll',
      method: 'post',
      params: data
    })
  },
  // 删除日志
  deleteLogs: function (data) {
    return fetch({
      url: '/log/DeleteLogs',
      method: 'post',
      params: data
    })
  },
  // 获取公告列表
  getBulletin: function (data) {
    return fetch({
      url: '/bulletin/GetAll',
      method: 'post',
      params: data
    })
  },
  // 获取有效公告
  getMyBulletin: function (data) {
    return fetch({
      url: '/bulletin/GetVaildateBulletins',
      method: 'get',
      params: data
    })
  },
  // 更新公告
  updateBulletin: function (data) {
    return fetch({
      url: '/bulletin/Update',
      method: 'post',
      params: data
    })
  },
  // 添加公告
  addBulletin: function (data) {
    return fetch({
      url: '/bulletin/',
      method: 'post',
      params: data
    })
  },
  // 删除公告
  deleteBulletin: function (data) {
    return fetch({
      url: '/bulletin/Delete',
      method: 'post',
      params: data
    })
  },
  // 删除公告列表
  deleteBulletins: function (data) {
    return fetch({
      url: '/bulletin/DeleteBulletins',
      method: 'post',
      params: data
    })
  },
  // 获取直播频道
  getLiveChannel: function (data) {
    return fetch({
      url: '/livechannel/GetAll',
      method: 'post',
      params: data
    })
  },
  // 更新直播频道
  updateLiveChannel: function (data) {
    return fetch({
      url: '/livechannel/Update',
      method: 'post',
      params: data
    })
  },
  // 添加直播频道
  addLiveChannel: function (data) {
    return fetch({
      url: '/livechannel/',
      method: 'post',
      params: data
    })
  },
  // 删除直播频道
  deleteLiveChannel: function (data) {
    return fetch({
      url: '/livechannel/Delete',
      method: 'post',
      params: data
    })
  },
  // 删除直播频道列表
  deleteLiveChannels: function (data) {
    return fetch({
      url: '/livechannel/DeleteLiveChannels',
      method: 'post',
      params: data
    })
    // return post('/livechannel/DeleteLiveChannels', data, )
  },
  // 获取直播列表
  GetLiveList: function (data) {
    return fetch({
      url: '/livechannel/GetLiveList',
      method: 'get',
      params: data
    })
  },
  // 获取用户的直播列表
  GetLiveUserByLive: function (data) {
    return fetch({
      url: `/livechannel/GetLiveUserByLive/` + data,
      method: 'get',
      params: data
    })
  },
  // 获取点播频道
  getVideo: function (data) {
    return fetch({
      url: '/video/GetAll',
      method: 'post',
      params: data
    })
  },
  // 更新点播资源
  updateVideo: function (data) {
    return fetch({
      url: '/video/Update',
      method: 'post',
      params: data
    })
  },
  // 添加点播资源
  addVideo: function (data) {
    return fetch({
      url: '/video/',
      method: 'post',
      params: data
    })
  },
  // 删除点播资源
  deleteVideo: function (data) {
    return fetch({
      url: '/video/Delete',
      method: 'post',
      params: data
    })
  },
  // 删除多个点播
  deleteVideos: function (data) {
    return fetch({
      url: '/video/DeleteVideos',
      method: 'post',
      params: data
    })
  },
  // 点播资源上传取消
  VideoCancel: function (data) {
    return fetch({
      url: '/video/VideoCancel',
      method: 'post',
      params: data
    })
  },
  // 获取点播列表
  GetVideoList: function (data) {
    return fetch({
      url: '/video/GetVideoList',
      method: 'get',
      params: data
    })
  },
  // 获取用户点播资源
  GetVideoUserByVideo: function (data) {
    return fetch({
      url: `/video/GetVideoUserByVideo/` + data,
      method: 'get',
      params: data
    })
  },
  //  观看行为
  VideoWatch: function (data) {
    return fetch({
      url: '/video/VideoWatch',
      method: 'post',
      params: data
    })
  },
  // 更新观看历史
  watchhistory: function (data) {
    return fetch({
      url: '/watchhistory/',
      method: 'post',
      params: data
    })
  },
  // 获取观看历史
  GetWatchHistory: function (data) {
    return fetch({
      url: '/watchhistory/GetWatchHistory',
      method: 'get',
      params: data
    })
  },
  // 单位统计类
  StatisticsOrgs: function (data) {
    return fetch({
      url: '/statistics/StatisticsOrgs',
      method: 'get',
      params: data
    })
  },
  // 用户统计
  StatisticsUser: function (data) {
    return fetch({
      url: '/statistics/StatisticsUser',
      method: 'get',
      params: data
    })
  },
  // 点播统计
  StatisticsVideo: function (data) {
    return fetch({
      url: '/statistics/StatisticsVideo',
      method: 'get',
      params: data
    })
  },
  // 直播统计
  StatisticsLive: function (data) {
    return fetch({
      url: '/statistics/StatisticsLive',
      method: 'get',
      params: data
    })
  },
  // 存储统计
  StaticticsStore: function (data) {
    return fetch({
      url: '/statistics/StatisticsStore',
      method: 'get',
      params: data
    })
  },
  // 获取采购单
  getBuyAll: function (data) {
    return fetch({
      url: '/buy',
      method: 'get',
      params: data
    })
  },
  getMyBuy: (data) => {
    return fetch({
      url: '/buy/GetMyBuy',
      method: 'get',
      params: data
    })
  },
  // 更新采购单
  updateBuy: function (data) {
    return fetch({
      url: '/buy/Update',
      method: 'post',
      params: data
    })
  },
  // 添加采购单
  addBuy: function (data) {
    return fetch({
      url: '/buy/',
      method: 'post',
      params: data
    })
  },
  // 删除采购单
  deleteBuy: function (data) {
    return fetch({
      url: '/buy/Delete',
      method: 'post',
      params: data
    })
  },
  // 上报采购单
  applyBuy: function (data) {
    return fetch({
      url: '/buy/Apply',
      method: 'post',
      params: data
    })
  },
  getAssetsbuyDoing: (data) => {
    return fetch({
      url: '/flow/GetAssetsbuyDoing',
      method: 'post',
      params: data
    })
  },
  // getAssetsbuyCompleted: (data) => {
  //   return fetch({
  //     url: '',
  //     method: 'post',
  //     params: data
  //   })
  // },
  getAssetsbuyFinish: (data) => {
    return fetch({
      url: '/flow/GetAssetsbuyFinish',
      method: 'post',
      params: data
    })
  },
  // 获取产品类型
  getProdType: function (data) {
    return fetch({
      url: '/prodtype',
      method: 'get',
      params: data
    })
  },
  // 更新产品类型
  updateProdType: function (data) {
    return fetch({
      url: '/prodtype/Update',
      method: 'post',
      params: data
    })
  },
  // 添加产品类型
  addProdType: function (data) {
    return fetch({
      url: '/prodtype/',
      method: 'post',
      params: data
    })
  },
  // 删除产品类型
  deleteProdType: function (data) {
    return fetch({
      url: '/prodtype/Delete',
      method: 'post',
      params: data
    })
  },
  // 获取产品
  getProd: function (data) {
    return fetch({
      url: '/prod',
      method: 'get',
      params: data
    })
  },
  // 更新产品
  updateProd: function (data) {
    return fetch({
      url: '/prod/Update',
      method: 'post',
      params: data
    })
  },
  // 添加产品
  addProd: function (data) {
    return fetch({
      url: '/prod/',
      method: 'post',
      params: data
    })
  },
  // 删除产品
  deleteProd: function (data) {
    return fetch({
      url: '/prod/Delete',
      method: 'post',
      params: data
    })
  },

  // 获取供应商
  getPartner: function (data) {
    return fetch({
      url: '/partner',
      method: 'get',
      params: data
    })
  },
  // 更新供应商
  updatePartner: function (data) {
    return fetch({
      url: '/partner/Update',
      method: 'post',
      params: data
    })
  },
  // 添加供应商
  addPartner: function (data) {
    return fetch({
      url: '/partner/',
      method: 'post',
      params: data
    })
  },
  // 删除供应商
  deletePartner: function (data) {
    return fetch({
      url: '/partner/Delete',
      method: 'post',
      params: data
    })
  },
  // 获取客户
  getCust: function (data) {
    return fetch({
      url: '/cust',
      method: 'get',
      params: data
    })
  },
  // 更新客户
  updateCust: function (data) {
    return fetch({
      url: '/cust/Update',
      method: 'post',
      params: data
    })
  },
  // 添加客户
  addCust: function (data) {
    return fetch({
      url: '/cust/',
      method: 'post',
      params: data
    })
  },
  // 删除客户
  deleteCust: function (data) {
    return fetch({
      url: '/cust/Delete',
      method: 'post',
      params: data
    })
  },
  // 获取预售商机订单
  getPreorder: function (data) {
    return fetch({
      url: '/preorder',
      method: 'get',
      params: data
    })
  },
  // 添加预售商机订单
  addPreorder: function (data) {
    return fetch({
      url: '/preorder',
      method: 'post',
      params: data
    })
  },
  // 更新预售商机订单
  updatePreorder: function (data) {
    return fetch({
      url: '/preorder/Update',
      method: 'post',
      params: data
    })
  },
  // 删除预售商机订单
  deletePreorder: function (data) {
    return fetch({
      url: '/preorder/Delete',
      method: 'post',
      params: data
    })
  },
  // 获取预售商机订单明细
  getPresales: function (data) {
    return fetch({
      url: `/presales/GetAll/` + data,
      method: 'get',
      params: data
    })
  },
  // 生成销售订单
  SetOrderByPreorder: function (data) {
    return fetch({
      url: '/preorder/SetOrderByPreorder',
      method: 'post',
      params: data
    })
  },

  // 获取销售订单
  getOrder: function (data) {
    return fetch({
      url: '/order',
      method: 'get',
      params: data
    })
  },
  // 获取自己管理的未开始流程销售订单
  GetMyOrder: function (data) {
    return fetch({
      url: '/order/GetMyOrder',
      method: 'get',
      params: data
    })
  },
  // 获取自己管理的未开始流程销售订单
  GetOrderOne: function (data) {
    return fetch({
      url: `/order/` + data,
      method: 'get',
      params: data
    })
  },
  // 添加销售订单
  addOrder: function (data) {
    return fetch({
      url: '/order',
      method: 'post',
      params: data
    })
  },
  // 更新销售订单
  updateOrder: function (data) {
    return fetch({
      url: '/order/Update',
      method: 'post',
      params: data
    })
  },
  // 删除 销售订单
  deleteOrder: function (data) {
    return fetch({
      url: '/order/Delete',
      method: 'post',
      params: data
    })
  },
  // 删除 销售订单多个
  deleteOrderList: function (data) {
    return fetch({
      url: '/order/DeleteOrderList',
      method: 'post',
      params: data
    })
  },
  // 销售订单上报
  OrderApply: function (data) {
    return fetch({
      url: '/order/OrderApply',
      method: 'post',
      params: data
    })
  },
  // 获取销售售订单明细
  getSales: function (data) {
    return fetch({
      url: `/sales/GetAll/` + data,
      method: 'get',
      params: data
    })
  },

  getBuyItems: (data) => {
    return fetch({
      url: '/buyitem/GetAll/' + data,
      method: 'get',
      params: data
    })
  },
  // 获取订单模板
  getTemp: function (data) {
    return fetch({
      url: '/temp',
      method: 'get',
      params: data
    })
  },
  // 添加订单模板
  addTemp: function (data) {
    return fetch({
      url: '/temp',
      method: 'post',
      params: data
    })
  },
  // 更新订单模板
  updateTemp: function (data) {
    return fetch({
      url: '/temp/Update',
      method: 'post',
      params: data
    })
  },
  // 删除订单模板
  deleteTemp: function (data) {
    return fetch({
      url: '/temp/Delete',
      method: 'post',
      params: data
    })
  },
  // 获取订单模板明细
  getTempitem: function (data) {
    return fetch({
      url: `/tempitem/GetAll/` + data,
      method: 'get',
      params: data
    })
  },

  //流程开始
  FlowStart: function (data) {
    return fetch({
      url: '/flow/FlowStart',
      method: 'post',
      params: data
    })
  },
  //流程审批
  FlowApprove: function (data) {
    return fetch({
      url: '/flow/FlowApprove',
      method: 'post',
      params: data
    })
  },
  //获取流程状态实例
  GetStateinsByBusy: function (data) {
    return fetch({
      url: `/flow/GetStateinsByBusy/` + data,
      method: 'get',
      params: data
    })
  },
  //正在执行的业务审批单
  GetBusyDoing: function (data) {
    return fetch({
      url: '/flow/GetBusyDoing',
      method: 'post',
      params: data
    })
  },
  // 已完成流转中业务审批单
  GetBusyFlowing: function (data) {
    return fetch({
      url: '/flow/GetBusyFlowing',
      method: 'post',
      params: data
    })
  },
  getAssetsbuyCompleted: (data) => {
    return fetch({
      url: '/flow/GetAssetsbuyCompleted',
      method: 'post',
      params: data
    })
  },
  // 已归档业务审批单
  GetBusyFinish: function (data) {
    return fetch({
      url: '/flow/GetBusyFinish',
      method: 'post',
      params: data
    })
  },
  applyAssetsbuy: (data) => {
    return fetch({
      url: '',
      method: 'post',
      params: data
    })
  },
  //根据订单获取应收款
  GetReceivByOrderId: function (data) {
    return fetch({
      url: `/receiv/GetReceivByOrderId/` + data,
      method: 'get',
      params: data
    })
  },
  //获取所有应收款
  GetReceivAll: function (data) {
    return fetch({
      url: '/receiv',
      method: 'get',
      params: data
    })
  },
  //获取所有服务实例
  GetServAll: function (data) {
    return fetch({
      url: '/serv/GetAll',
      method: 'post',
      params: data
    })
  },
  //更新服务实例
  updateServ: function (data) {
    return fetch({
      url: '/serv/Update',
      method: 'post',
      params: data
    })
  },

  getServById: (data) => {
    return fetch({
      url: '/serv/GetOne',
      method: 'post',
      params: data
    })
  },
  getServiTimeLine: (data) => {
    return fetch({
      url: '/serv/GetTimeLine',
      method: 'post',
      params: data
    })
  },

  // 获取售后服务
  getAllService: (data) => {
    return fetch({
      url: '/service/GetAll',
      method: 'post',
      params: data
    })
  },
  addService: (data) => {
    return fetch({
      url: '/service',
      method: 'post',
      params: data
    })
  },
  getAllSin: (data) => {
    return fetch({
      url: '/sin/',
      method: 'get',
      params: data
    })
  },
  getAllInsByBusyId: (data) => {
    return fetch({
      url: '/ins/GetAllInsByBusyId',
      method: 'post',
      params: data
    })
  },
  up2Store: (data) => {
    return fetch({
      url: '/sin/Up2Store',
      method: 'post',
      params: data
    })
  },
  getAllSout: (data) => {
    return fetch({
      url: '/sout/',
      method: 'get',
      params: data
    })
  },
  getAllOutsByBusyId: (data) => {
    return fetch({
      url: '/outs/GetAllOutsByBusyId',
      method: 'post',
      params: data
    })
  },
  up2Outbound: (data) => {
    return fetch({
      url: '/sout/Up2Outbound',
      method: 'post',
      params: data
    })
  },
  getPayGroupByBuyId: () => {
    return fetch({
      url: '/pay/GetPayGroupByBuyId',
      method: 'get'
    })
  },
  getPayItemByBusyId: (data) => {
    return fetch({
      url: '/pay/GetPayItemByBusyId',
      method: 'post',
      params: data
    })
  },
  itempay: (data) => {
    return fetch({
      url: '/pay/Itempay',
      method: 'post',
      params: data
    })
  },
  getReceivGroupByBuyId: () => {
    return fetch({
      url: '/receiv/GetReceivGroupByBuyId',
      method: 'get'
    })
  },
  getReceivItemByBusyId: (data) => {
    return fetch({
      url: '/receiv/GetReceivItemByBusyId',
      method: 'post',
      params: data
    })
  },
  itemreceiv: (data) => {
    return fetch({
      url: '/receiv/Itemreceiv',
      method: 'post',
      params: data
    })
  },
  getAllStocks: () => {
    return fetch({
      url: '/stock/GetAllStock',
      method: 'get'
    })
  },
  getImplements: () => {
    return fetch({
      url: '/implement/GetAll',
      method: 'get'
    })
  },
  getImplementDetails: (data) => {
    return fetch({
      url: '/implementdetail/GetImplementDetailsByImplement',
      method: 'post',
      params: data
    })
  },
  debugImplementDetails: (data) => {
    return fetch({
      url: '/implementdetail/DebugImplementDetail',
      method: 'post',
      params: data
    })
  },
  installImplementDetails: data => {
    return fetch({
      url: '/implementdetail/InsatallImplementDetail',
      method: 'post',
      params: data
    })
  },

  // engineer_instance_item  
  PostInstance: data => {
    return fetch({
      url: '/engineer_instance_item/PostInstance',
      method: 'post',
      params: data
    })
  },
  GetMyEngineerInstance: () => {
    return fetch({
      url: '/engineer_instance/GetMyEngineerInstance',
      method: 'get'
    })
  },
  DeleteList: data => {
    return fetch({
      url: '/engineer_instance/DeleteList',
      method: 'post',
      params: data
    })
  },
  GetInstanceItemByInstanceId: data => {
    return fetch({
      url: '/engineer_instance_item/GetInstanceItemByInstanceId',
      method: 'post',
      params: data
    })
  },
  GetInstanceById: data => {
    return fetch({
      url: '/engineer_instance/GetInstanceById',
      method: 'post',
      params: data
    })
  },
  // 获取技术人员变更明细
  GetInstanceItem: function (data) {
    return fetch({
      url: '/engineer_instance_item/GetSfEngineerItems',
      method: 'post',
      params: data
    })
  },

  // sfyy
  CreateSfyy: data => {
    return fetch({
      url: '/sf_sfyy',
      method: 'post',
      params: data
    })
  },
  GetSfyy: () => {
    return fetch({
      url: '/sf_sfyy/GetSfyy',
      method: 'get'
    })
  },
  StatisticsSfyyByYear: () => {
    return fetch({
      url: '/sf_sfyy/StatisticsSfyyByYear',
      method: 'get'
    })
  },
  StatisticsSfyyByMonth: (data) => {
    return fetch({
      url: '/sf_sfyy/StatisticsSfyyByMonth',
      method: 'post',
      params: data
    })
  },
  GetSfCaseById: (data) => {
    return fetch({
      url: '/sf_case/GetSfCaseById',
      method: 'post',
      params: data
    })
  },
  // sf_case:
  PostCase: (data) => {
    return fetch({
      url: '/sf_case/PostCase',
      method: 'post',
      params: data
    })
  },
  GetCaseItemsByCase : (data) => {
    return fetch({
      url: "/sf_case/GetCaseItemsByCase/"+ data,
      method: "get"
    })
  },  
  QueryAllCase: (data) => {
    return fetch({
      url: `/sf_case/QueryAllCase/${data.current}`,
      method: "get"
    })
  },
  GetAllCaseForExport: () => {
    return fetch({
      url: '/sf_case/GetAllCaseForExport',
      method: 'get'
    })
  },
  DelCaseRealated: (data) => {
    return fetch({
      url: '/sf_case/DelCaseRealated',
      method: 'post',
      params: data
    })
   
  },
  // GetListByBusy
  GetListByBusy : (data) => {
    return fetch({
      url: "/sf_todo/GetListByBusy/"+ data,
      method: "get"
    })
  }, 
  // AddSuggest 
  AddSuggest : (data) => {
    return fetch({
      url: "/sf_todo/AddSuggest",
      method: "post",
      params: data
    })
  }, 
  // DeleteCaseList
  DeleteCaseList: (data) => {
    return fetch({
      url: '/sf_case/DeleteCaseList',
      method: 'post',
      params: data
    })
  },
  // AdditionCase
  AdditionCase: (data) => {
    return fetch({
      url: '/sf_case/AdditionCase',
      method: 'post',
      params: data
    })
  },
  // GetSfCases
  GetSfCases: () => {
    return fetch({
      url: '/sf_case/GetSfCases',
      method: 'get'
    })
  },
  //GetJianYanZhong
  GetJianDingZhong: () => {
    return fetch({
      url: '/sf_todo/GetJianDingZhong',
      method: 'get'
    })
  },
  // GetDaiShouJian
  GetDaiShouJian: () => {
    return fetch({
      url: '/sf_todo/GetDaiShouJian',
      method: 'get'
    })
  },
  // StopJianYan
  StopJianYan: (data)=> {
    return fetch({
      url: '/sf_todo/StopJianYan',
      method: 'post',
      params: data
    })
  },
  GetJianYanZhong: () => {
    return fetch({
      url: '/sf_todo/GetJianYanZhong',
      method: 'get'
    })
  },
  GetDaiQuJian: () => {
    return fetch({
      url: '/sf_todo/GetDaiQuJian',
      method: 'get'
    })
  },
  GetDaiSongJian: () => {
    return fetch({
      url: '/sf_todo/GetDaiSongJian',
      method: 'get'
    })
  },
  UpdateTodoStatus: (data) => {
    return fetch({
      url: '/sf_todo/UpdateTodoStatus',
      method: 'post',
      params: data
    })
  },
  // GetYiQuJian
  GetYiQuJian: () => {
    return fetch({
      url: '/sf_todo/GetYiQuJian',
      method: 'get'
    })
  },

  // GetFenju
  GetFenju: () => {
    return fetch({
      url: '/sf_desc/GetFenju',
      method: 'get'
    })
  },
  // UpdateSfDesc
  UpdateSfDesc: (data) => {
    return fetch({
      url: '/sf_desc/UpdateSfDesc',
      method: 'post',
      params: data
    })
  },
  // GetSfDescByDept
  GetSfDescByDept: (data) => {
    return fetch({
      url: '/sf_desc/GetSfDescByDeptId',
      method: 'post',
      params: data
    })
  },
  // GetSfTermByType
  GetSfTermByType: (data) => {
    return fetch({
      url: '/sf_term/GetSfTermByType',
      method: 'post',
      params: data
    })
  },
  //UpdateSfTerm
  UpdateSfTerm: (data) => {
    return fetch({
      url: '/sf_term/UpdateSfTerm',
      method: 'post',
      params: data
    })
  },
  // ComplaintCall
  ComplaintCall: () => {
    return fetch({
      url: '/params/ComplaintCall',
      method: 'get'
    })
  },
  GetAssetsbuyUser: (data) => {
    return fetch({
      url: '/flow/GetAssetsbuyUserAndBusy',
      method: 'post',
      params: data
    })
  },

  // app 管理 
  GetApps: ()=> {
    return fetch({
      url: '/app/GetApps',
      method: 'get'
    })
  },
  GetAppVersion: (data) => {
    return fetch({
      url: `/app/GetAppVersion?channel=${data.channel}&package=${data.package}`,
      method: 'get'
    })
  },
  GetApps: ()=> {
    return fetch({
      url: '/app/GetApps',
      method: 'get'
    })
  },
  UpdateApp: (data) =>{
    return fetch({
      url: '/app/UpdateApp',
      method: 'post',
      params: data
    })
  },
  GetMyRate: () => {
    return fetch({
      url: '/rate/GetMyRate',
      method: 'get'
    })
  },
  UpdateRate: (data) => {
    return fetch({
      url: '/rate/UpdateRate',
      method: 'post',
      params: data
    })
  }
}

export default apiList
